﻿using DoNet.Core.Models;
using SqlSugar;
using System.ComponentModel;

namespace DoNet.Bpmn.Models
{
    /// <summary>
    /// Represents the configuration for BPMN node outside access.
    /// </summary>
    [SugarTable("Bpmn_NodeOutSideAccessConfig", "")]
    [Serializable]
    public class BpmnNodeOutSideAccessConfig : TenantEntity, ICreationAudited, IModificationAudited, IDeleteAudited
    {
        /*
        `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'auto increment id',
        `bpmn_node_id` bigint(20) NOT NULL COMMENT 'bpmn_node_id',
        `node_mark` varchar(50) DEFAULT NULL COMMENT 'node mark',
        `sign_type` int(11) DEFAULT NULL COMMENT 'sign type 1 for all sign 2 for or sign',
        `remark` varchar(255) DEFAULT NULL COMMENT 'remark',
        `is_del` int(11) NOT NULL DEFAULT '0' COMMENT '0 for normal 1 for delete',
        `create_user` varchar(50) DEFAULT NULL COMMENT 'as its name says',
        `create_time` timestamp not null default CURRENT_TIMESTAMP  COMMENT 'as its name says',
        `update_user` varchar(50) DEFAULT NULL COMMENT 'as its name says',
        `update_time`  timestamp  default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'as its name says',
        */
        /// <summary>
        /// 获取或设置 编号
        /// </summary>
        [DisplayName("编号")]
        [SugarColumn(IsPrimaryKey = true, ColumnDescription = "编号,主键")]
        public override long Id { get; set; }

        /// <summary>
        /// Node ID.
        /// </summary>
        [SugarColumn(ColumnDescription = "")]
        public virtual long BpmnNodeId { get; set; }

        /// <summary>
        /// Node mark.
        /// </summary>
        public string NodeMark { get; set; } = string.Empty;

        /// <summary>
        /// Sign type: 1 for all sign, 2 for or sign.
        /// </summary>
        public int? SignType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDescription = "备注")]
        public virtual string Description { get; set; } = string.Empty;

        /// <summary>
        /// 创建日期
        /// </summary>
        [SugarColumn(ColumnDescription = "创建日期")]
        public virtual DateTime? CreatorTime { get; set; }

        /// <summary>
        /// 创建用户主键
        /// </summary>
        [SugarColumn(ColumnDescription = "创建用户主键")]
        public virtual long? CreatorUserId { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最后修改时间")]
        public virtual DateTime? LastModifyTime { get; set; }

        /// <summary>
        /// 最后修改用户
        /// </summary>
        [SugarColumn(ColumnDescription = "最后修改用户")]
        public virtual long? LastModifyUserId { get; set; }

        /// <summary>
        /// 删除标志
        /// </summary>
        [SugarColumn(ColumnDescription = "删除标志")]
        public virtual bool DeleteMark { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [SugarColumn(ColumnDescription = "删除时间")]
        public virtual DateTime? DeleteTime { get; set; }

        /// <summary>
        /// 删除用户
        /// </summary>
        [SugarColumn(ColumnDescription = "删除用户")]
        public virtual long? DeleteUserId { get; set; }
    }
}
